package com.cykj.pos.insideLogin.mapper.provider;

import com.cykj.common.utils.StringUtils;
import org.apache.ibatis.jdbc.SQL;

/**
 * @author wangjiaqi
 * @date 2021/12/29
 */
public class InsideLoginMapperProvider {

    private static final String TABLE = "sys_user";

    public String findUser(String nickName) {
        SQL sql = new SQL();
        sql.SELECT("*")
                .FROM(TABLE)
                .WHERE(" 1 = 1 ");
        if (StringUtils.isNotEmpty(nickName)) {
            sql.WHERE("nick_name = #{userName} ");
        }
        return sql.toString();
    }
}
